package com.rmb.request;

import com.rmb.common.model.sensitive.NameUtil;
import com.rmb.mart.entity.userinfo.UserCompany;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;


/**
 * @author zhaomuyang
 */
public class UserCompanyRequest extends UserCompany {
    /**
        分页参数
     */
    private Integer pageNum = 1;
    private Integer pageSize = 10;


    private String message;

    /**
        新增接口转为List<Map<String, Object>>
     */
    private String apiJsonString;

    public boolean jsonIsNotNull (){
        return this.apiJsonString != null && this.apiJsonString.length() != 0;
    }

    public boolean messageIsNotNull(){
        return this.message != null && !Objects.equals(this.message, "");
    }


    public UserCompanyRequest() {
    }

    public UserCompanyRequest(Integer pageNum, Integer pageSize, String apiJsonString) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.apiJsonString = apiJsonString;
    }

    public UserCompanyRequest(Integer pageNum, Integer pageSize, String message, String apiJsonString) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.message = message;
        this.apiJsonString = apiJsonString;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "UserCompanyRequest{" +
                "pageNum=" + pageNum +
                ", pageSize=" + pageSize +
                ", apiJsonString='" + apiJsonString + '\'' +
                '}';
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getApiJsonString() {
        return apiJsonString;
    }

    public void setApiJsonString(String apiJsonString) {
        this.apiJsonString = apiJsonString;
    }
}
